﻿using Max.PH4.Shoppgin.Admin.DataAccess;
using Max.PH4.Shoppgin.Admin.Domain;
using Max.PH4.Shoppgin.Admin.IRespository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4.Shoppgin.Admin.Respository
{
    public class SKURespository : ISKURespository
    {
        MyDbContext _context;

        public SKURespository(MyDbContext context)
        {
            _context = context;
        }

        public void Delete(SKUEntity entity)
        {
            throw new NotImplementedException();
        }

        public void Delete(object id)
        {
            throw new NotImplementedException();
        }

        public void Insert(SKUEntity entity)
        {
            _context.SKUs.Add(entity);
            //return _context.SaveChanges();
        }

        public void Insert(List<SKUEntity> entities)
        {
            throw new NotImplementedException();
        }

        public IQueryable<SKUEntity> Query()
        {
            throw new NotImplementedException();
        }

        public void Update(SKUEntity entity)
        {
            throw new NotImplementedException();
        }

        public void Update(List<SKUEntity> entities)
        {
            _context.SKUs.UpdateRange(entities);
        }
    }
}
